@{
var m = ViewBag.Manager;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0" />
  <title>@ViewData["Title"] - ShopForWeb.UI</title>
  <link rel="stylesheet"
        href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
  <link rel="stylesheet"
        href="~/lib/bootstrap/dist/font/bootstrap-icons.css" />
  @await RenderSectionAsync("PluginCss", required: false)
  <link rel="stylesheet"
        href="~/css/site.css"
        asp-append-version="true" />
  <link rel="stylesheet"
        href="~/ShopForWeb.UI.styles.css"
        asp-append-version="true" />
  @await RenderSectionAsync("DemoCss", required: false)
</head>

<body>
  <header class="text-center border-bottom">
    <div class="row">
      <div class="col-2"></div>
      <div class="col-8 text-center"
           style="height: 80px; line-height:80px;">
        <p>
          <h1>商城管理系统</h1>
        </p>
      </div>
      <div class="col-2">
        <div class="dropdown d-flex justify-content-end"
             style="margin-top:30px;">
          <button class="btn btn-light dropdown-toggle"
                  type="button"
                  id="dropdownMenuButton1"
                  data-bs-toggle="dropdown"
                  aria-expanded="false">
            <i class="bi bi-person"></i>&nbsp; @m?.Name
          </button>
          <ul class="dropdown-menu"
              aria-labelledby="dropdownMenuButton1">
            <li><a class="dropdown-item"
                 href="/admin/managers/password">修改密码</a></li>
            <li><a class="dropdown-item"
                 id="menu-logout"
                 href="#">注销</a></li>
          </ul>
        </div>

      </div>
    </div>

  </header>
  <div class="container-fluid"
       style="min-height: 400px;">
    <div class="row">
      <div class="col-3">
        <div class="list-group mt-2">
          <a id="menu_commoditys"
             asp-area="admin"
             asp-controller="Commodity"
             asp-action="GetPage"
             class="list-group-item list-group-item-action"
             aria-current="true">
            <i class="bi bi-truck"></i>&nbsp;商品管理
          </a>
          <a id="menu_managers"
             asp-area="admin"
             asp-controller="Manager"
             asp-action="GetPage"
             class="list-group-item list-group-item-action"
             aria-current="true">管理员管理</a>
          <a href="#"
             class="list-group-item list-group-item-action">A third link item</a>
          <a href="#"
             class="list-group-item list-group-item-action">A fourth link item</a>
          <a class="list-group-item list-group-item-action disabled">A disabled link item</a>
        </div>
      </div>
      <div class="col-9">
        @RenderBody()
      </div>
    </div>
  </div>

  <footer class="border-top footer text-muted text-center"
          style="height: 80px;">
    <div class="container">
      &copy; 2022 - ShopForWeb.UI - <a asp-area=""
         asp-controller="Home"
         asp-action="Privacy">Privacy</a>
    </div>
  </footer>
  <script src="~/lib/jquery/dist/jquery.min.js"></script>
  <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
  @await RenderSectionAsync("PluginScripts", required: false)
  <script src="~/js/site.js"
          asp-append-version="true"></script>
  <script>
    $(function () {
      $("#menu-logout").on("click", function () {
        $.ajax({
          type: "post",
          url: "/admin/managers/logout",
          success: function (response) {
            if (response.status == 0)
              location.href = "/admin"

          }
        });
      })
    });
  </script>
  @await RenderSectionAsync("DemoScripts", required: false)
</body>



</html>
